package main

import (
	"fmt"
)

func main() {
	str := "hello hhhh"
	fmt.Printf("The length of str is :%d\n", len(str))
	for i, v := range str {
		fmt.Printf("The index is :%d, The value is :%c\n", i, v)
	}
	fmt.Println()
	str2 := "hello hhhh 自己拼命干"
	fmt.Printf("The length of str2 is :%d\n", len(str2))
	for i, v := range str2 {
		fmt.Printf("The index is :%d, The value is :%c\n", i, v)
	}
	fmt.Println()
	fmt.Println("index int(rune)")
	for index, rune := range str2 {
		fmt.Printf("%-2d %d %U '%c' % X\n", index, rune, rune, rune, []byte(string(rune)))
	}
	for i := 0; i < 5; i++ {
		var v int
		fmt.Printf("%d ", v)
		v = 5
	}
	s := ""
	for s != "aaaaa" {
		fmt.Println("Value of s:", s)
		s = s + "a"
	}
}
